package com.hspedu.newData.dmsxl.数组;
/**
 * @Author: yh
 * @description: 
 * @CreateTime: 2025-05-21 
 * @Version: 1.0
 */

public class LC263丑数 {

    public boolean isUgly(int n) {
        if (n<=0){
            return false;
        }

        int[] res = new int[]{2,3,5};

        for (int re : res) {
            while (n%re==0){
                n /= re;
            }
        }

        return n==1;
    }

}
